﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jzy;

namespace ECommerce.Model.Member
{
    public partial class MemberBaseInfo : EntityBase
    {
        private const string TABLE_NAME = "MemberBase";
        private const string INSERT_SQL = "insert into MemberBase ( [ID], [Name], [LoginName], [Password], [Mobile], [Email], [State], [Remain], [AreaCode], [AreaName], [Street], [ZipCode], [Birthday], [Gender], [InputTime], [Level], [Integral]) values ( @ID, @Name, @LoginName, @Password, @Mobile, @Email, @State, @Remain, @AreaCode, @AreaName, @Street, @ZipCode, @Birthday, @Gender, @InputTime, @Level, @Integral)";
        private const string UPDATE_SQL = "update MemberBase set  [ID] = @ID, [Name] = @Name, [LoginName] = @LoginName, [Password] = @Password, [Mobile] = @Mobile, [Email] = @Email, [State] = @State, [Remain] = @Remain, [AreaCode] = @AreaCode, [AreaName] = @AreaName, [Street] = @Street, [ZipCode] = @ZipCode, [Birthday] = @Birthday, [Gender] = @Gender, [InputTime] = @InputTime, [Level] = @Level, [Integral] = @Integral where ID = @ID";
        /// <summary>
        /// PK
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 昵称
        /// </summary>
        public String Name
        {
            get;
            set;
        }
        /// <summary>
        /// 登录名
        /// </summary>
        public String LoginName
        {
            get;
            set;
        }
        /// <summary>
        /// 密码
        /// </summary>
        public String Password
        {
            get;
            set;
        }
        /// <summary>
        /// 手机
        /// </summary>
        public String Mobile
        {
            get;
            set;
        }
        /// <summary>
        /// 邮件
        /// </summary>
        public String Email
        {
            get;
            set;
        }
        /// <summary>
        /// 状态(枚举)
        /// </summary>
        public Int32 State
        {
            get;
            set;
        }
        /// <summary>
        /// 余额
        /// </summary>
        public Double Remain
        {
            get;
            set;
        }
        /// <summary>
        /// 区域码
        /// </summary>
        public Int32? AreaCode
        {
            get;
            set;
        }
        /// <summary>
        /// 区域名称
        /// </summary>
        public String AreaName
        {
            get;
            set;
        }
        /// <summary>
        /// 街道
        /// </summary>
        public String Street
        {
            get;
            set;
        }
        /// <summary>
        /// 邮编
        /// </summary>
        public String ZipCode
        {
            get;
            set;
        }
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime? Birthday
        {
            get;
            set;
        }
        /// <summary>
        /// 性别
        /// </summary>
        public Int32 Gender
        {
            get;
            set;
        }
        /// <summary>
        /// 注册时
        /// </summary>
        public DateTime InputTime
        {
            get;
            set;
        }
        /// <summary>
        /// 级别
        /// </summary>
        public Int32 Level
        {
            get;
            set;
        }
        /// <summary>
        /// 会员积分
        /// </summary>
        public Int32 Integral
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "loginname":
                    this.LoginName = (String)value;
                    break;
                case "password":
                    this.Password = (String)value;
                    break;
                case "mobile":
                    this.Mobile = (String)value;
                    break;
                case "email":
                    this.Email = (String)value;
                    break;
                case "state":
                    this.State = (Int32)value;
                    break;
                case "remain":
                    this.Remain = (Double)value;
                    break;
                case "areacode":
                    this.AreaCode = (Int32?)value;
                    break;
                case "areaname":
                    this.AreaName = (String)value;
                    break;
                case "street":
                    this.Street = (String)value;
                    break;
                case "zipcode":
                    this.ZipCode = (String)value;
                    break;
                case "birthday":
                    this.Birthday = (DateTime)value;
                    break;
                case "gender":
                    this.Gender = (Int32)value;
                    break;
                case "inputtime":
                    this.InputTime = (DateTime)value;
                    break;
                case "level":
                    this.Level = (Int32)value;
                    break;
                case "integral":
                    this.Integral = (Int32)value;
                    break;
            }
        }
    }


}
